#ifndef XMLREADER_H
#define XMLREADER_H
#include <QString>
#include <QVariant>

class QXmlStreamReader;
class QIOdevice;

class XmlReader
{
public:
    XmlReader(QIODevice *device);
    ~XmlReader();
    QString getIdName();
    QString getSymbolName();
    QString getVersion();
    QString getVendor();
    QString getCopyright();
    QString getActivatorClassName();
    QString getActivatorLibraryName();
    bool getLazyStart();
    qint32 getRunLevel();
    QList<QString> getDebpedency();
    QString getCode();
    QString getFiles();


private:
    void startReadXml();
    void ReadManifest(QXmlStreamReader *xml);
    void ReadActivator(QXmlStreamReader *xml);
    void ReadDependency(QXmlStreamReader *xml);
    void ReadCode(QXmlStreamReader *xml);
    void ReadFiles(QXmlStreamReader *xml);

    QXmlStreamReader *_xml;

    //manifest
    QString _idName;
    QString _symbolName;
    QString _version;
    QString _vendor;
    QString _copyright;
    QString _activatorClassName;
    QString _activatorLibraryName;
    QString _lazyStart;
    QString _runLevel;
    QList<QString> _dependency;

    //code
    QString _code;

    //files
    QString _files;

};

#endif // XMLREADER_H
